VERSION 5.00
Begin VB.Form frmTest 
   Caption         =   "Test"
   ClientHeight    =   1125
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   3450
   Icon            =   "frmTest.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   1125
   ScaleWidth      =   3450
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton cmdTestConnect 
      Caption         =   "cmdDbConnect"
      Enabled         =   0   'False
      Height          =   495
      Left            =   120
      TabIndex        =   1
      Top             =   120
      Visible         =   0   'False
      Width           =   372
   End
   Begin VB.CommandButton cmdExtract 
      Caption         =   "Extract IRP3a"
      Height          =   735
      Left            =   600
      TabIndex        =   0
      Top             =   120
      Width           =   2295
   End
End
Attribute VB_Name = "frmTest"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'   Program to
'1) extract data from sql server database
'2) save data to ascii file



Private Sub cmdExtract_Click()
    Dim objTest As clsExtractIRP3A
    Dim lngSuccess As Long
    
    Set objTest = New clsExtractIRP3A
    
    lngSuccess = objTest.Extract
    
    MsgBox objTest.GetErrorMessages(lngSuccess), , "Test"
    
    Set objTest = Nothing
    
End Sub

Private Sub cmdTestConnect_Click()

    Dim blnTest As Boolean
    Dim rsTest As ADODB.Recordset

''objAdoConn.ConnectString = "Provider=SQLOLEDB.1;Data Source=MSSC05;User ID=sa;Password=;Initial Catalog=pgiz;Persist Security Info=False"

    If objAdoConn Is Nothing Then
        MsgBox "damn thing;'s not set"
        Set objAdoConn = Nothing
        Set objAdoConn = CreateObject("AdoDbserver.clsDbFunctions")
    End If

    blnTest = objAdoConn.InitConnect(, "Keytax SQL", "Keytax")
    If blnTest Then
        Set rsTest = objAdoConn.OpenRecordset("Select * from dir_funds")
        If rsTest.RecordCount > 0 Then
            MsgBox "Yipee!!"
        Else
            MsgBox "Uh-oh"
        End If
    Else
        MsgBox "Couldn't connect"
    End If

End Sub
